<div style="padding: 5px">
	<ul class="ztree" id="rightTree" style="margin-top: 0px;
    border: 0px;
    background: #fff;
    width: 0;
    height: 0;
    overflow-y: visible;
    overflow-x: visible;"></ul>
</div>
<script type="text/javascript">
var rightTreeSetting = {
		async : {
			enable : true,
			url : '${cxt!}/organization/rightTreeData',
			autoParam : [ "id=ids" ],//, "name=n", "level=lv"
			otherParam : {"level" : "${organ.level}"},
			type : "post"
		},
		view : {
			expandSpeed : "",
			selectedMulti : false
		},
		data : {
			simpleData : {
				enable : true
			}
		},
		check : {
			enable : true,
			chkStyle : "checkbox",
			chkboxType : {
				"Y" : "ps",
				"N" : "ps"
			}
		},
		callback : {
			onAsyncSuccess : rightTreeOnAsyncSuccess,
			onAsyncError: rightTreeOnAsyncError
		}
	};
	function rightTreeOnAsyncError(){
	}
	
	//rightTree加载完成后默认展开第一级
	var firstAsyncSuccessFlag = 0;
	function rightTreeOnAsyncSuccess(event, treeId, msg) {
		
		if (firstAsyncSuccessFlag == 0) {
			try {
				
				//调用默认展开第一个结点  
				var nodes = rightTree.getNodes();
				rightTree.expandNode(nodes[0], true);
	
				var childNodes = rightTree.transformToArray(nodes[0]);
				rightTree.expandNode(childNodes[1], true);
				firstAsyncSuccessFlag = 1;
			} catch (err) {
	
			}
	
		}
	}
	
	$.fn.zTree.init($("#rightTree"), rightTreeSetting);
</script>